<extend name="Layout/base" />

<block name="main">
    <style>
        .list_fund_title{
            width:350px;
        }
        .list_buy_btn{
            background: #926d4d;
            color: white;
            padding: 2px 15px;
            border-radius: 10%;
        }
    </style>
    <div class="section section-shop">
            <div class="container">
                    <div class="box box-solid">
                            <div class="box-header"><div class="box-title">所有分类</div></div>
                            <div class="box-body">
                                    <dl class="list-class">
                                            <dt class="class-header">基金类型</dt>
                                            <dd class="class-options JS-fund-type">
                                                    <span class="option" data-code="0">不限</span>
                                                    <volist name="fundType" id="item">
                                                    <span class="option <?php if(I('type')==$item['code']):?>active<?php endif;?>" data-code="{$item.code}">{$item.type}</span>
                                                    </volist>
                                            </dd>
                                    </dl>
                                    <dl class="list-class">
                                            <dt class="class-header">基金公司</dt>
                                            <dd class="class-options JS-fund-company">
                                                    <span class="" data-code="0">不限</span>
                                                    <volist name='fundCompany' id='company'>
                                                        <span class="option <?php if(I('company')==$key):?>active<?php endif;?>" data-code='{$key}'>{$company.companyName}</span>
                                                    </volist>
                                            </dd>
                                            <dd class="class-more"><a href="javascript: void(0)">展开</a></dd>
                                    </dl>
                            </div>
                            <div class="box-footer JS-fund-search-rules">
                                    <dl class="list-class">
                                            <dt class="class-header">已选择条件</dt>
                                            <dd class="class-options options-selected">
                                                <span class="option JS-search-type" style="display:none;">类型：<font class="JS-search-value">混合型</font><font class="option-close"  data-type="type">&times;</font></span>
                                                <span class="option JS-search-company" style="display:none;">公司：<font class="JS-search-value">诺安基金</font><font class="option-close" data-type="company">&times;</font></span>
                                                <span class="option JS-search-keywords" style="display:none;">关键字：<font class="JS-search-value"></font><font class="option-close" data-type="keywords">&times;</font></span>
                                            </dd>
                                    </dl>
                            </div>
                    </div>
                    <div class="box box-table mt10">
                            <div class="ui-table-tool">
                                    <p class="ui-fr">共有<font class="colorStrong" id="JS-fund-count">{$fundCount}</font>只符合要求的基金 </p>
                            </div>
                            <table class="ui-table ui-table-hover">
                                    <thead>
                                            <tr>
                                                    <th>基金代码</th>
                                                    <th class="list_fund_title">基金名称</th>
                                                    <th>基金类型</th>
                                                    <th>日期</th>
                                                    <th>单位净值/万份收益</th>
                                                    <th>累计净值/七日年化</th>
                                                    <th>日涨幅</th>
                                                    <th>风险评估</th>
                                                    <th>操作</th>
                                            </tr>
                                    </thead>
                                    <tbody class="JS-fund-data"> 
                                        <volist name='fundList' id='fund'>
                                            <tr>
                                                    <td>{$fund.securityCode} </td>
                                                    <td><a href="{:U('/fund_'.$fund['code'])}" style="color:inherit">{$fund.title}</a></td>
                                                    <td>{$fund.fundType}</td>
                                                    <td>{$fund.establishTimeStr}</td>
                                                    <td>{$fund._unitOrProfit}</td>
                                                    <td>{$fund._aunitOrweeklyYield}</td>
                                                    <td>{$fund.dailyGrowth}</td>
                                                    <td>{$fund.riskLevelStr|default='暂无'}</td>
                                                    <td><a href="{$fund.buyUrl}" class="list_buy_btn" target="_blank">申购</a></td>
                                            </tr>
                                        </volist>
                                    </tbody>
                            </table>
                            <div class="ui-table-footer more">
                                <?php if($fundCount<$pageSize):?>
                                <a href="javascript:void(0);" class="JS-fund-load" data-all="1">没有更多了</a>
                                <?php else:?>
                                <a href="javascript:void(0);" class="JS-fund-load" data-all="0">加载更多</a>
                                <?php endif;?>
                            </div>
                    </div>					
            </div>
    </div>
</block>
